Back

Laravel stubs

There is an easier way to create classes. Instead of creating User model from scratch you can type

php artisan make:model User

It is generated by stubs modules. If you want to change default one, first publish stubs:

php artisan stub:publish

And edit as you like:

 

Now, every time you create model with stub, $guarded is set to empty.

Posted To avatar
Laravel
• 2 years ago

Please login or create an account to post a comment.

No Posts
No comments yet...